package com.msb.nacos.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/****************************************************
 *
 * @author lbf
 * @date 2025/6/16 11:26
 ****************************************************/
@Configuration
public class RestTemplateConfig {

    @LoadBalanced  //开启远程调用负载均衡
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
